nlp_architect.data.intent_datasets.SNIPS

class nlp_architect.data.intent_datasets.SNIPS(path, sentence_length=30, word_length=12)[source]

SNIPS dataset class

Parameters
  • path (str) – dataset path

  • sentence_length (int, optional) – max sentence length

  • word_length (int, optional) – max word length

__init__(path, sentence_length=30, word_length=12)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(path[, sentence_length, word_length])

Initialize self.

Attributes

char_vocab

word character vocabulary

char_vocab_size

char vocabulary size

files

intent_size

intent label vocabulary size

intents_vocab

intent labels vocabulary

label_vocab_size

label vocabulary size

tags_vocab

labels vocabulary

test_files

test_set

test set

train_files

train_set

train set

word_vocab

tokens vocabulary

word_vocab_size

vocabulary size

char_vocab

word character vocabulary

Type

dict

char_vocab_size

char vocabulary size

Type

int

files = ['train', 'test']
intent_size

intent label vocabulary size

Type

int

intents_vocab

intent labels vocabulary

Type

dict

label_vocab_size

label vocabulary size

Type

int

tags_vocab

labels vocabulary

Type

dict

test_files = ['AddToPlaylist/validate_AddToPlaylist.json', 'BookRestaurant/validate_BookRestaurant.json', 'GetWeather/validate_GetWeather.json', 'PlayMusic/validate_PlayMusic.json', 'RateBook/validate_RateBook.json', 'SearchCreativeWork/validate_SearchCreativeWork.json', 'SearchScreeningEvent/validate_SearchScreeningEvent.json']
test_set

test set

Type

tuple of numpy.ndarray

train_files = ['AddToPlaylist/train_AddToPlaylist_full.json', 'BookRestaurant/train_BookRestaurant_full.json', 'GetWeather/train_GetWeather_full.json', 'PlayMusic/train_PlayMusic_full.json', 'RateBook/train_RateBook_full.json', 'SearchCreativeWork/train_SearchCreativeWork_full.json', 'SearchScreeningEvent/train_SearchScreeningEvent_full.json']
train_set

train set

Type

tuple of numpy.ndarray

word_vocab

tokens vocabulary

Type

dict

word_vocab_size

vocabulary size

Type

int